/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exercises.day02.pt01;

import java.util.Scanner;

/**
 *
 * @author (jaice)
 * @version 0.1 (may 28, 2012)
 * 
 * b. Write a program that asks for names and displays the initials. 
 * Ask the user for their first name.  Save it in a string variable. 
 * Ask the user for their last name.  Save it in a string variable.
 * Use the substring() method to get the first characters from both the first
 * and last names.  Use the toUpperCase() method to convert them to upper case. 
 * Display the initials to the user.
 * 
 */
public class GetInitialsMain {
    
    /**
     * 
     * @param args 
     */
    public static void main(String args[]) {
        //declare variables
        String fname="";
        String lname="";
                       
                //declare scanner
        Scanner sc = new Scanner(System.in);
        
        
        System.out.println("Enter your first name");
        fname=sc.nextLine();
                System.out.println("Enter your last name");
        lname=sc.nextLine();      
        
        GetInitials initials = new GetInitials(fname, lname);
        
        System.out.println("Your initials are : " + initials.ReturnInitials());
        
        
        
    }
}
